<?php
header('content-type:text/html;charset=utf-8');
var_dump(filter_var('382771946qq.com',FILTER_VALIDATE_EMAIL));
echo '<hr/>';
$options=array(
  'options'=>array(
      'default'=>18
  )  
);
var_dump(filter_var(103,FILTER_VALIDATE_INT,$options));
echo '<hr/>';
$arr=array(
  'username'=>'king',
   'age'=>'1234',
    'email'=>'382771946.com'
);
$filters=array(
  'username'=>array(
      'filter'=>FILTER_CALLBACK,
      'options'=>'ucwords'
  ),
  'age'=>array(
       'filter'=>FILTER_VALIDATE_INT,
        'options'=>array(
            'min_range'=>1,
            'max_range'=>150,
            'default'=>18
        )
  ),
    'email'=>array(
        'filter'=>FILTER_VALIDATE_EMAIL
    )
);
var_dump(filter_var_array($arr,$filters));
echo '<hr/>';
print_r(filter_list());
echo '<hr/>';
foreach(filter_list() as $k=>$v){
    echo "{$v}--".filter_id($v).'<br/>';
}
























